<?php

defined('MYLITS') ? '' : exit('No direct script access allowed');

/**
 * @version     1.0.0
 * @package     mylits engine
 * @license     GNU General Public License version 3
 * @author      Arfan Fudyartanto D N <arfan@mylits.com> - http://engine.mylits.com
 */
class deleteProcess extends Mylits_Process {

    function __construct() {
        parent::__construct();
        $this->model = $this->loadModel('users');
    }

    public function response($id) {
        $id = Mylits_Security::decrypt($id);
        $result = $this->model->dellUser($id);
        if ($result) {
            $msgClass = 'success';
            $msg = Mylits_Language::getText('success');
        } else {
            $msgClass = 'warning';
            $msg = Mylits_Language::getText('failed');
        }
        Mylits_System::addSystemMsg($msgClass, $msg);
        Mylits_System::redirect($this->getComponentName());
    }

}

?>
